#ifndef _PROTOS_H_
#define _PROTOS_H_

#include "vr.h"
#include "vrProtoTypes.h"

class UpdateNodeData {
public:
	UpdateNodeData* next; // next in the linked list
	int definition_index;
	int use_index;
	void substitute_actual_argument(VRParseType* node_type,VRNode* where,VRProtoCall* call_arguments);
	// definition_index chooses WRLSTYPE in call_arguments
	// use_index chooses WRLSTYPE in where which will be replaced
	UpdateNodeData(int d_idx,int u_idx);
}; 


class UpdateList{
public:
	UpdateNodeData* head;
	VRParseType* type;

	UpdateList(VRParseType* tp);
	UpdateList(UpdateList*);
	void add_record(int d_idx,int u_idx);
	~UpdateList();
};

void SubstituteActualArgs(VRProtoCall* the_call,VRNode* &root,int evaluate_shapes);

#endif // _PROTOS_H_